

import 'package:flutter/material.dart';
import 'package:rabbit/core/utils/app_utils.dart';

class HomePage extends StatefulWidget {
  HomePage({Key key}) : super(key: key);
  @override
  _HomePageState createState() => _HomePageState();
}


class _HomePageState extends State<HomePage> {

  @override
  Widget build(BuildContext context) {
    AppSize.init(context);

    return Scaffold(
      appBar: AppBar(
        title: Text("test"),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(
              'You have pushed the button this many times:',
            )
          ],
        ),
      ),
    );
  }


  @override
  void initState() {
    super.initState();
//    loadCateGoryData();
  }


  ///加载大类列表和标签
//  void loadCateGoryData() async {
//    ArticleCateEntity entity = await ArticleCateDao.listCates();
//    if (entity?.articleCateDtos != null) {
//      List<Tab> myTabsTmp = <Tab>[];
//      myTabsTmp.add(Tab(text:'首页'));
//      List<Widget> bodysTmp = [];
//      bodysTmp.add(FindingTabView());
//
//      for (int i = 0; i < entity.articleCateDtos.length; i++) {
//        ArticleCategoryDTO model = entity.articleCateDtos[i];
//
//        if (model.cateName == "荣誉证书") {
//          continue;
//        }
//        myTabsTmp.add(Tab(text: model.cateName));
//        bodysTmp.add(FindingTabView(currentPage:i, id:model.cateId.toString()));
//      }
//
//
//      myTabsTmp.add(Tab(text:'荣誉证书'));
//      bodysTmp.add(CertificateTabView());
//
//
//      setState(() {
//        myTabs.addAll(myTabsTmp);
//        bodys.addAll(bodysTmp);
//        mController = TabController(
//          length: myTabs.length,
//          vsync: this,
//        );
//        _layoutState = LoadState.State_Success;
//      });
//
//    }else{
//      setState(() {
//        _layoutState = LoadState.State_Error;
//      });
//    }
//  }


}